<template>
  <div class='page-comment'>
    <van-tabs type="card" @click="onClick">
      <van-tab :title="`全部${rateList.length}`"></van-tab>
      <van-tab :title="`满意${goodRateList.length}`"></van-tab>
      <van-tab :title="`不满意${badRateList.length}`"></van-tab>
    </van-tabs>

    <!-- <div v-for="item in xx"></div> -->

  </div>
</template>

<script>
import { mapState, mapGetters } from "vuex";
export default {
  data() {
    return {};
  },
  computed: {
    ...mapState("shop", ["rateList"]),
    ...mapGetters("shop", ["goodRateList", "badRateList"]),
  },
  created() {
    this.$store.dispatch("shop/A_getShopRate");
  },
  methods: {
    onClick(index) {
      console.log("index :>> ", index);
    },
  },
};
</script>

<style lang="scss" scoped>
</style>